﻿///<reference path="../../../../Scripts/jquery-1.4.1-vsdoc.js"/>
///<reference path="../utils/Utils.js"/>


function NavigationPaneController(controlId) {

    ///private properties/////////////
    var controlId = controlId;
    var control;    
    var container;
    var bibleNavigationPane;    
    var accordion;
    var searchControl;

    this.Init = function () {
        control = $("#" + controlId);
        container = $("<div>",
        {
            className: "windowFullHeight ui-widget ui-widget-content ui-corner-all navigationPaneContainer"
        }).appendTo(control);

        accordion = new AccordionBase("navigationAccordion", container);
        searchControl = new SearchControl("searchControl");
        bibleNavigationPane = new BibleNavigationPane("bibleNavigationPane");

        accordion.AddNewPanel("Вся Библия", bibleNavigationPane.Container);
        accordion.AddNewPanel("Поиск", searchControl.GetContainer(),
            function () { searchControl.FocusSearchTextBox(); });

        accordion.AddNewPanel("Тэги", "1");
        accordion.AddNewPanel("Мои документы", "2");
        accordion.AddNewPanel("Благовестие по '2-е Тимофею'", "3");        
        accordion.AddNewPanel("Курсы", "4");
        accordion.AddNewPanel("Словари", "5");

        bibleNavigationPane.Render();
        searchControl.Render();
        accordion.Render();
    }

   
}
